Verification method, verification device, electronic device and computer readable storage medium

ABSTRACT

The present disclosure provides a verification method, a verification device, an electronic device and a computer readable storage medium. The verification method includes: determining whether the movable component is triggered; when the movable component is triggered, moving the infrared camera and the structured light projector toward the outside of the housing along with the bracket to extend from the housing, and initializing the infrared camera and the structured light projector; obtaining an infrared image by the infrared camera; determining whether a human face exists in the infrared image; if yes, determining whether the human face matches the face template of the authorized user, obtaining a laser pattern by the structured light projector and the infrared camera, obtaining a depth image according to the laser pattern, and determining whether the depth image matches the depth template of the authorized user; when both match, determining that the verification is passed.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to Chinese Patent Application Nos.201810575116.6 and 201810574771.X, each filed Jun. 6, 2018, the entiredisclosures of which are incorporated herein by reference.

FIELD

The present application relates to a field of consumer electronicstechnology, and more particularly, to a verification method, averification device, an electronic device and a computer readablestorage medium.

BACKGROUND

The existing camera component for face unlocking is generally disposedon a front case of a mobile phone, such that a display screen disposedon the front case cannot be made into a full screen.

SUMMARY

Embodiments of the present disclosure provide a verification method, averification device, an electronic device and a computer readablestorage medium.

The verification method of the present disclosure includes: determiningwhether a movable component is triggered, wherein the movable componentis received in a housing and capable of extending out from the housing,the movable component includes a bracket, an infrared camera disposed onthe bracket and a structured light projector disposed on the bracket;when the movable component is triggered, moving the infrared camera andthe structured light projector toward the outside of the housing alongwith the bracket to extend out from the housing, and initializing theinfrared camera and the structured light projector; obtaining aninfrared image by the infrared camera; determining whether a human faceexists in the infrared image; when a human face exists in the infraredimage, determining whether the human face matches a face template of anauthorized user, obtaining a laser pattern by the structured lightprojector and the infrared camera, obtaining a depth image according tothe laser pattern, and determining whether the depth image matches adepth template of the authorized user; and when the human face matchesthe face template of the authorized user, and the depth image matchesthe depth template of the authorized user, determining that verificationis passed.

The electronic device of the present disclosure includes a housing, amovable component and a processor. The movable component is received inthe housing and capable of extending out from the housing. The movablecomponent includes a bracket, an infrared camera disposed on the bracketand a structured light projector disposed on the bracket. When themovable component is triggered, the bracket is configured to move towardthe outside of the housing along with the infrared camera and thestructured light projector to enable the infrared camera and thestructured light projector to extend out from the housing, and theinfrared camera and the structured light projector are configured to beinitialized. The infrared camera is configured to obtain an infraredimage. The infrared camera and the structured light projector areconfigured to obtain a laser pattern. The processor is configured to:determine whether the movable component is triggered; determine whethera human face exists in the infrared image; when a human face exists inthe infrared image, determine whether the human face matches a facetemplate of an authorized user, obtain a depth image according to thelaser pattern, and determine whether the depth image matches a depthtemplate of the authorized user; and when the human face matches theface template of the authorized user, and the depth image matches thedepth template of the authorized user, determine that verification ispassed.

The verification device of the present disclosure includes a memory anda processor. The memory is configured to store instructions executableby the processor. The processor is configured to run a programcorresponding to the instructions by reading the instructions stored inthe memory, so as to: determine whether a movable component istriggered, wherein the movable component is received in the housing andcapable of extending out from the housing, the movable componentcomprises a bracket, an infrared camera disposed on the bracket and astructured light projector disposed on the bracket; when the movablecomponent is triggered, control the bracket to move toward the outsideof the housing together with the infrared camera and the structuredlight projector to enable the infrared camera and the structured lightprojector to extend out from the housing, and control the infraredcamera and the structured light projector to be initialized; control theinfrared camera to obtain an infrared image; determine whether a humanface exists in the infrared image; when a human face exists in theinfrared image, determine whether the human face matches a face templateof an authorized user, control the infrared camera and the structuredlight projector to obtain a laser pattern, obtain a depth imageaccording to the laser pattern, and determine whether the depth imagematches a depth template of the authorized user; and determine thatverification is passed, when the human face matches the face template ofthe authorized user, and the depth image matches the depth template ofthe authorized user.

The computer readable storage medium of the present disclosure includesone or more computer executable instructions. When the one or morecomputer executable instructions are executed by one or more processors,the verification method according to embodiments of the presentdisclosure is performed.

Additional aspects and advantages of the present disclosure will begiven in part in the following descriptions, become apparent in partfrom the following descriptions, or be learned from the practice of theembodiments of the present disclosure.

DESCRIPTION OF THE FIGURES

In order to more clearly illustrate the embodiments of the presentdisclosure or the technical solutions in the related art, the drawingsused in the embodiments or the related art will be briefly describedbelow. Obviously, the drawings in the following description are onlycertain embodiments of the present disclosure, and other drawings can beobtained according to the drawings by those skilled in the art, withoutinventive work.

FIG. 1 is a schematic flow chart of a verification method according toembodiments of the present disclosure.

FIGS. 2-3 are schematic diagrams of an electronic device according toembodiments of the present disclosure.

FIG. 4 is a schematic diagram of a verification device according toembodiments of the present disclosure.

FIGS. 5-10 are schematic flow charts of a verification method accordingto embodiments of the present disclosure.

FIG. 11 is a schematic diagram of an electronic device according toembodiments of the present disclosure.

FIG. 12 is a schematic diagram of a verification device according toembodiments of the present disclosure.

FIGS. 13-17 are schematic flow charts of a verification method accordingto embodiments of the present disclosure.

MODE OF CARRYING OUT THE INVENTION

Embodiments of the present disclosure will be described in detail andexamples of embodiments are illustrated in the drawings. The same orsimilar elements and the elements having the same or similar functionsare denoted by like reference numerals throughout the descriptions.Embodiments described herein with reference to drawings are explanatory,serve to explain the present disclosure, and are not construed to limitembodiments of the present disclosure.

In addition, it is to be understood that, terms such as “first” and“second” are used herein for purposes of description and are notintended to indicate or imply relative importance or significance of thelisted feature. Furthermore, the feature defined with “first” and“second” may include one or more this feature distinctly or implicitly.In the description of the present disclosure, “a plurality of” means twoor more than two, unless specified otherwise.

In the present disclosure, unless specified or limited otherwise, theterms of “installation”, “linkage” and “connection” shall be understoodbroadly, for example, it could be permanent connection, or could beremovable connection or integral connection; it could be mechanicalconnection, or could be electric connection, or could communicate witheach other; it could be direct linkage, or could be indirect linkage viaintermediate media, or could be interlink between two elements orinteractive relationship between two elements. Those of ordinary skillin the art shall understand the concrete notations of the termsmentioned above in the present disclosure according to specificcircumstances.

Many different embodiments or examples are provided in the following toimplement different structures of the present disclosure. To simplifythe present disclosure, the components and settings of specific examplesare provided below. Of course, they are merely examples, and are notintended to limit the present disclosure. Furthermore, reference numbersand/or reference letters may be repeated in different examples of thepresent disclosure. Such repetitions are for simplification andclearness, rather than indicating the relations of the discussedembodiments and/or settings. Moreover, the present disclosure providesexamples of various specific processes and materials, but theapplicability of other processes and/or application of other materialsmay be appreciated by those having ordinary skill in the art.

Embodiments of the present disclosure will be described in detail andexamples of embodiments are illustrated in the drawings. The same orsimilar elements and the elements having the same or similar functionsare denoted by like reference numerals throughout the descriptions.Embodiments described herein with reference to drawings are explanatory,serve to explain the present disclosure, and are not construed to limitembodiments of the present disclosure.

As illustrated in FIGS. 1-3, the verification method of embodiments ofthe present disclosure includes the following operations.

At block 01, it is determined whether a movable component 10 istriggered. The movable component 10 is received in a housing 101 andcapable of extending out from the housing 101. The movable component 10includes a bracket 11, an infrared camera 12 disposed on the bracket 11,and a structured light projector 13 disposed on the bracket 11.

At block 02, when the movable component 10 is triggered, the bracket 11is moved toward the outside of the housing along with the infraredcamera 12 and the structured light projector 13 to enable the infraredcamera 12 and the structured light projector 13 to extend out from thehousing 101, and the infrared camera 12 and the structured lightprojector 13 are initialized.

At block 03, an infrared image is obtained by the infrared camera 12.

At block 04, it is determined whether a human face exists in theinfrared image.

At block 05, when a human face exists in the infrared image, it isdetermined whether the human face matches a face template of anauthorized user, a laser pattern is obtained by the structured lightprojector 13 and the infrared camera 12, a depth image is obtainedaccording to the laser pattern, and it is determined whether the depthimage matches a depth template of the authorized user.

At block 06, when the human face matches the face template of theauthorized user, and the depth image matches the depth template of theauthorized user, it is determined that verification is passed.

As illustrated in FIGS. 2 and 3, the electronic device 100 ofembodiments of the present disclosure includes a housing 101, a movablecomponent 10, and a processor 40. The movable component 10 includes abracket 11, an infrared camera 12, and a structured light projector 13.The processor 40 is coupled to the infrared camera 12 and the structuredlight projector 13 respectively. The movable component 10 is received inthe housing 101 and capable of extending out from the housing 101. Indetail, the housing 101 includes a head portion 102 and a tail portion103 opposed to the head portion 102. The housing 101 further includes afront surface 104 coupling to the head portion 102 and the tail portion103 respectively, and a back surface (not shown) opposed to the frontsurface 104. A display screen 105 is provided on the front surface 104.The display screen 105 is a full screen. The movable component 10 isdisposed at the end of the housing 101 where the head portion 102 is.The electronic device 100 includes any one of a mobile phone, a tabletcomputer, a smart bracelet, and a smart helmet. The electronic device100 of embodiments of the present disclosure is exemplified by taking amobile phone as an example.

The processor 40 is configured to: determine whether the movablecomponent 10 is triggered; when the movable component 10 is triggeredand the infrared camera 12 is configured to obtain an infrared image,determine whether a human face exists in the infrared image; when thehuman face exists in the infrared image, determine whether the humanface matches the face template of the authorized user; obtain the depthimage according to the laser pattern; determine whether the depth imagematches the depth template of the authorized user; when the human facematches the face template of the authorized user, and the depth imagematches the depth template of the authorized user, determine that theverification is passed. In other words, the acts at blocks 01, 04, 05and 06 may be implemented by the processor 40.

As illustrated in FIG. 4, embodiments of the present disclosure furtherprovide a verification device 200. The verification device 200 includesa first determining module 21, a second determining module 22, a thirddetermining module 23, a fourth determining module 24, a verifyingmodule 25 and an obtaining module 27.

The first determining module 21 is configured to determine whether themovable component 10 is triggered. In other words, the act at block 01may be implemented by the first determining module 21.

The second determining module 22 is configured to determine whether thehuman face exists in the infrared image after the infrared camera 12obtains the infrared image. In other words, the act at block 04 may beimplemented by the second determining module 22.

The third determining module 23 is configured to determine whether thehuman face matches the face template of the authorized user, when thehuman face exists in the infrared image.

The obtaining module 27 is configured to obtain the depth imageaccording to the laser pattern.

The fourth determining module 24 is configured to determine whether thedepth image matches the depth template of the authorized user.

The verifying module 25 is configured to determine that the verificationis passed, when the human face matches the face template of theauthorized user, and the depth image matches the depth template of theauthorized user. In other words, the act at block 06 may be implementedby the verifying module 25.

In the verification device 200, the electronic device 100, and theverification method of embodiments of the present disclosure, when themovable component 10 is triggered, the infrared camera 12 and thestructured light projector 13 are driven to move toward the outside ofthe housing 101 with the bracket 11 to extend out from the housing 101,and the infrared camera 12 and the structured light projector 13 areinitialized, such that the infrared image may be obtained once theinfrared camera 12 and the structured light projector 13 moves intoposition outside of the housing 101, which reduces the execution time ofthe verification method and improves the verification speed.

In a first embodiment of the present disclosure, when a human faceexists in the infrared image, determining whether the face matches theface template of the authorized user, obtaining the laser pattern by thestructured light projector 13 and the infrared camera 12, obtaining thedepth image according to the laser pattern, and determining whether thedepth image matches the depth template of the authorized user (the actat block 05), includes the following operations.

At block 051, when a human face exists in the infrared image, it isdetermined whether the human face matches the face template of anauthorized user.

At block 052, when the human face matches the face template of theauthorized user, the laser pattern is obtained by the structured lightprojector 13 and the infrared camera 12, the depth image is obtainedaccording to the laser pattern, and it is determined whether the depthimage matches the depth template of the authorized user.

As illustrated in FIGS. 1, 3 and 5, the verification method according tothe first embodiment of the present disclosure includes the followingoperations. At block 01, it is determined whether the movable component10 is triggered. The movable component 10 is received in the housing 101and capable of extending out from the housing 101. The movable component10 includes the bracket 11, the infrared camera 12 disposed on thebracket 11, and the structured light projector 13 disposed on thebracket 11.

At block 02, when the movable component 10 is triggered, the bracket 11is moved toward the outside of the housing 101 along with the infraredcamera 12 and the structured light projector 13 to enable the infraredcamera 12 and the structured light projector to extend out from thehousing 101, and the infrared camera 12 and the structured lightprojector 13 are initialized.

At block 03, the infrared image is obtained by the infrared camera 12.

At block 04, it is determined whether a human face exists in theinfrared image.

At block 051, when a human face exists in the infrared image, it isdetermined whether the human face matches the face template of theauthorized user.

At block 052, when the human face matches the face template of theauthorized user, the laser pattern is obtained by the structured lightprojector 13 and the infrared camera 12, the depth image is obtainedaccording to the laser pattern, and it is determined whether the depthimage matches the depth template of the authorized user.

At block 06, when the depth image matches the depth template of theauthorized user, it is determined that the verification is passed.

The act at block 02 includes the followings.

At block 021, the infrared camera 12 and the structured light projector13 are driven to move toward the outside of the housing 101 along withthe bracket to extend out from the housing 101.

At block 022, the infrared camera 12 and the structured light projector13 are initialized.

The act at block 052 includes the followings.

At block 0521, when the human face matches the face template of theauthorized user, the laser pattern is obtained by the structured lightprojector 13 and the infrared camera 12.

At block 0522, the depth image is obtained according to the laserpattern.

At block 0523, it is determined whether the depth image matches thedepth template of the authorized user.

As illustrated in FIGS. 2 and 3, the electronic device 100 ofembodiments of the present disclosure includes the housing 101, themovable component 10, and the processor 40. The movable component 10includes the bracket 11, the infrared camera 12, and the structuredlight projector 13. The processor 40 is coupled to the infrared camera12 and the structured light projector 13 respectively. The movablecomponent 10 is received in the housing 101 and capable of extending outfrom the housing 101. In detail, the housing 101 includes the headportion 102 and the tail portion 103 opposed to the head portion 102.The housing 101 further includes the front surface 104 coupling the headportion 102 and the tail portion 103, and the back surface (not shown)opposed to the front surface 104. The display screen 105 is provided onthe front surface 104. The display screen 105 is a full screen. Themovable component 10 is disposed at the end of the housing 101 where thehead portion 102 is. The electronic device 100 includes any one of amobile phone, a tablet computer, a smart bracelet, and a smart helmet.The electronic device 100 of embodiments of the present disclosure isexemplified by taking a mobile phone as an example.

The processor 40 is configured to: determine whether the movablecomponent 10 is triggered; when the movable component 10 is triggeredand the infrared camera 12 obtains the infrared image, determine whethera human face exists in the infrared image; when a human face exists inthe infrared image, determine whether the human face matches the facetemplate of the authorized user; when the human face matches the facetemplate of the authorized user and the structured light projector 13and the infrared camera 12 obtains the laser pattern, obtain the depthimage according to the laser pattern, and determine whether the depthimage matches the depth template of the authorized user; and when thedepth image matches the depth template of the authorized user, determinethat the verification is passed. In other words, the acts at blocks 01,04, 051, 0522, 0523 and 06 may be implemented by the processor 40.

When the movable component 10 is triggered, the bracket 11 moves towardthe outside of the housing 101 along with the infrared camera 12 and thestructured light projector 13 to enable the infrared camera 12 and thestructured light projector 13 to extend out from the housing 101. Theinfrared camera 12 and the structured light projector 13 areinitialized. In other words, the act at block 021 may be implemented bythe bracket 11, and the act at block 02 may be implemented by theinfrared camera 12 and the structured light projector 13 together.First, the bracket 11 moves toward the outside the housing 101 alongwith the infrared camera 12 and the structured light projector 13 toenable the infrared camera 12 and the structured light projector 13 toextend out from the housing 101, and then the infrared camera 12 and thestructured light projector 13 are initialized. In other words, the actat block 021 is executed before the act at block 022. In another case,the bracket 11 moves toward the outside of the housing 101 along withthe infrared camera 12 and the structured light projector 13 to theinfrared camera 12 and the structured light projector 13 to extend outfrom the housing 101, and at the same time, the infrared camera 12 andthe structured light projector 13 are initialized. In other words, theacts at blocks 021 and 022 are executed at the same time, which bringsthe preparation (initialization) time of the infrared camera 12 and thestructured light projector 13 forward to reduce the overall executiontime of the verification method, compared to performing the act at block021 before the act at block 022.

The infrared camera 12 is capable of obtaining the infrared image. Indetail, the infrared camera 12 is configured to obtain the infraredimage after the movable component 10 is triggered. In other words, theact at block 03 may be implemented by the infrared camera 12.

The infrared camera 12 and the structured light projector 13 may beconfigured together to obtain the laser pattern. In detail, the infraredcamera 12 and the structured light projector 13 are configured togetherto obtain the laser pattern, when the human face matches the facetemplate of the authorized user. In other words, the act at block 0521may be implemented by the infrared camera 12 and the structured lightprojector 13 together.

The operation of triggering the movable component 10 includes: movingand/or turning the electronic device 100 in a predetermined manner(e.g., the user turns the head portion 102 toward the side of the frontsurface 104); lighting up the display screen 105 (e.g., when the displayscreen 105 is in a black-out state, the user lights up the displayscreen 105 by pressing a button on the electronic device 100 or the userlights up the display screen 105 by double clicking on the displayscreen 105); opening the face detection application in the electronicdevice 100 (e.g., the user opens/clicks the face detection applicationor software in the electronic device 100, in detail, when the user usesthe electronic device 100, the user may open the user verificationsoftware in the electronic device 100 to identify the face of the userto determine whether the user has the right to use the electronic device100); and clicking a button/key for starting the face detection in therunning application in the electronic device 100 (e.g., when the useruses the payment software, the user clicks a button in the paymentsoftware to make payment by scanning the face). In detail, the operationof triggering the movable component 10 is also an operation of startingthe infrared camera 12 and the structured light projector 13. In otherwords, the infrared camera 12 and the structured light projector 13 areturned on when the user performs the above operations (moving and/orturning the electronic device 100 in a predetermined manner, lighting upthe display screen 105, opening the face detection application in theelectronic device 100, clicking a button/key for starting the facedetection in the running application in the electronic device 100), andthe initialization operation starts after the infrared camera 12 and thestructured light projector 13 are turned on. When the user needs toperform face recognition using the infrared camera 12 and the structuredlight projector 13, the user performs the above operations (movingand/or turning the electronic device 100 in a predetermined manner,lighting up the display screen 105, opening the face detectionapplication in the electronic device 100, clicking a button/key forstarting the face detection application in the running application inthe electronic device 100) that generate a trigger signal for triggeringthe movable component 10, and the processor 40 may determine whether themovable component 10 is triggered according to whether the triggersignal is received.

The electronic device 100 further includes a driving component 31disposed within the housing 101 and coupled to the bracket 11. Thedriving component 31 is configured to drive the bracket 11 to move. Thedriving component 31 includes a drive motor. The processor 40 is coupledto the driving component 31, and controls the driving component 31 todrive the movable component 10 to move, when the movable component 10 istriggered.

The initialization of the infrared camera 12 and the structured lightprojector 13 includes starting the driving procedure of the infraredcamera 12 to prepare the infrared camera 12 for shooting, and startingthe driving procedure of the structured light projector 13 to preparethe structured light projector 13 for projecting the infrared laser.

The infrared camera 12 may obtain an infrared image, when the bracket 11moves into position and stops moving. Since the infrared image isobtained when the bracket 11 is stable, the infrared image is relativelyclear, which is advantageous for performing subsequent facedetermination and reduces repeated shooting of infrared images. Theinfrared camera 12 may also obtain the infrared image when the infraredcamera 12 is completely exposed outside the housing 101, and the bracket11 has not stopped moving. For example, when the infrared camera 12 iscompletely exposed outside of the housing 101 and the moving speed ofthe bracket 11 is less than one-third of the maximum speed of thebracket 11, the infrared camera 12 obtains the infrared image, and thus,the time for shooting the image is advanced, which further reduces theoverall execution time of the verification method, and improves the userexperience.

The act of determining whether a human face exists in the infrared imagemay include: performing feature extraction on the infrared image byusing a specific algorithm, matching the extracted feature with a knownface feature vector, and determining whether the infrared image is aface image according to the matching result. The features of theinfrared image may be extracted by an active shape model (ASM), a localbinary patterns (LBP) algorithm, a principal component analysis (PCA)algorithm and a linear discriminant analysis (LDA) algorithm.

The authorized user may be the owner of the electronic device 100 or afriend or a relative of the owner. The face template of the authorizeduser may be a face template pre-stored inside or outside the electronicdevice 100. The face template can be an infrared image of the face ofthe authorized user, and the infrared image of the face may be a flatimage.

When the face in the infrared image matches the face template of theauthorized user, the structured light projector 13 is configured toproject a laser to the target object (the outside of the electronicdevice 100), and the laser pattern of the target object is obtained bythe infrared camera 12. The depth template of the authorized user may bea face depth template pre-stored inside or outside the electronic device100. The depth template may be a face depth image of the authorizeduser, and the face depth image may be obtained by structured lightdetection.

When the processor 40 determines that the infrared image matches theface template of the authorized user, it can be considered that theinfrared image currently input by the user and the pre-stored facetemplate are from the same user. However, since the face template andthe infrared image are both flat images, the infrared image is easy toforge. For example, verification is performed with a two-dimensionalphotograph. Therefore, the processor 40 further determines whether thedepth image of the target object matches the depth template of theauthorized user, and thus whether the current user is the authorizeduser of the pre-stored depth template can be better verified. When theprocessor 40 determines that the depth image matches the depth templateof the authorized user, it is determined that the verification ispassed. After the verification is passed, the current user can obtainthe corresponding operation authority of the electronic device 100, suchas screen unlocking, payment, and the like.

In the existing mobile phone, in order to make the display screen on thefront of the mobile phone a full screen, the camera component can beselectively hidden inside the mobile phone or exposed outside the mobilephone. In order to reduce the time for the camera component to performface unlocking, the camera component is generally turned on frequentlyfor obtaining an image of the user, resulting in a large powerconsumption of the mobile phone.

In the electronic device 100 and the verification method of theembodiments of the present disclosure, after it is determined that ahuman face exists in the infrared image and the human face matches theface templet of the authorized user, the laser pattern is obtained bythe structured light projector 13 and the infrared camera 12, the depthimage is obtained according to the laser pattern and it is determinedwhether the depth image matches the depth template of the authorizeduser. Compared to turning on the structured light projector 13 and theinfrared camera 12 to obtain the laser pattern simultaneously withdetermining whether the face matches the authorized user's face, thenumber of times the structured light projector 13 and the infraredcamera 12 are turned on is reduced, thereby further reducing the powerconsumption of the electronic device 100 and prolonging the service lifeof the structured light projector 13 and the infrared camera 12.

As illustrated in FIGS. 2, 4 and 5, embodiments of the presentdisclosure provide a verification device 200. The verification device200 includes the first determining module 21, the second determiningmodule 22, the third determining module 23, the fourth determiningmodule 24, the verifying module 25 and the obtaining module 27.

The first determining module 21 is configured to determine whether themovable component 10 is triggered. In other words, the act at block 01may be implemented by the first determining module 21.

The second determining module 22 is configured to determine whether ahuman face exists in the infrared image after the infrared camera 12obtains the infrared image. In other words, the act at block 04 may beimplemented by the second determining module 22.

The third determining module 23 is configured to determine whether thehuman face matches the face template of the authorized user when thehuman face exists in the infrared image. In other words, the act atblock 051 may be implemented by the third determining module 23.

The obtaining module 27 is configured to obtain the depth imageaccording to the laser pattern, when the human face matches the facetemplate of the authorized user. In other words, the act at block 0522may be implemented by the obtaining module 27.

The fourth determining module 24 is configured to determine whether thedepth image matches the depth template of the authorized user. In otherwords, the act at block 0523 may be implemented by the fourthdetermining module 24. In other words, the act at block 052 may beimplemented by the infrared camera 12, the structured light projector13, the third determining module 23, the obtaining module 27 and thefourth determining module 24 together.

The verifying module 25 is configured to determine that the verificationis passed, when the depth image matches the depth template of theauthorized user. In other words, the act at block 06 may be implementedby the verifying module 25.

The act at block 021 may be implemented by the bracket 11. The act atblock 022 may be implemented by the infrared camera 12 and thestructured light projector 13 together. The act at block 02 may beimplemented by the bracket 11, the infrared camera 12 and the structuredlight projector 13 together. The act at block 03 may be implemented bythe infrared camera 12. The act at block 0521 may be implemented by theinfrared camera 12 and the structured light projector 13 together.

The acts implemented by the first determining module 21, the seconddetermining module 22, the third determining module 23, the fourthdetermining module 24, the verifying module 25 and the obtaining module27 may also be implemented by the processor 40.

The first determining module 21 is coupled to the driving component 31,the infrared camera 12 and the structured light projector 13respectively, so that after the first determining module 21 determinesthat the movable component 10 is triggered, the first determining module21 can transmit a signal to the driving component 31, the infraredcamera 12 and the structured light projector 13 to drive the drivingcomponent 31, the infrared camera 12 and the structured light projector13 to implement the act at block 02.

The second determining module 22 is coupled to the infrared camera 12and the structured light projector 13 respectively, so that the infraredimage obtained by the infrared camera 12 can be transmitted to thesecond determining module 22, and the second determining module 22 cantransmit a signal to the infrared camera 12 and the structured lightprojector 13 after determining that a human face exists in the infraredimage, such that the act at block 0521 can be implemented by theinfrared camera 12 and the structured light projector 13.

The obtaining module 27 is coupled to the infrared camera 12 and thefourth determining module 24 respectively, so that the obtaining module27 can receive the laser pattern obtained by the infrared camera 12, andthe obtaining module 27 can transmit the depth image to the fourthdetermining module 24 after generating the depth image.

In the verification device 200, the electronic device 100 and theverification method of the embodiments of the present disclosure, afterit is determined that a human face exists in the infrared image and thehuman face matches the face templet of the authorized user, the laserpattern is obtained by the structured light projector 13 and theinfrared camera 12, the depth image is obtained according to the laserpattern, and it is determined whether the depth image matches the depthtemplate of the authorized user. Compared to turning on the structuredlight projector 13 and the infrared camera 12 to obtain the laserpattern while determining whether the face matches the authorized user'sface, the number of times the structured light projector 13 and theinfrared camera 12 are turned on is reduced, thereby further reducingthe power consumption of the electronic device 100 and prolonging theservice life of the structured light projector 13 and the infraredcamera 12.

As illustrated in FIGS. 2 and 3, in some embodiments, the movablecomponent 10 further includes an infrared fill light 14, and theinfrared fill light 14 may be configured to emit infrared light to theoutside, and the infrared light is received by the infrared camera 12after being reflected by the object. In detail, when the infrared camera12 is configured to obtain the infrared image, the infrared fill light14 is configured to emit infrared light to the outside, to enhance theintensity of the infrared light received by the infrared camera 12 afterbeing reflected by the object, thereby improving the sharpness of theinfrared image.

As illustrated in FIGS. 2 and 3, in some embodiments, the movablecomponent 10 further includes at least one of a front camera 15, areceiver 16, a light sensor 17, a proximity sensor 18, a rear camera 19,and a visible light fill light 191. In this way, the front camera 15,the receiver 16, the light sensor 17, or the proximity sensor 18 are notrequired to be disposed on the front surface 104 of the housing 101, sothat the display screen 105 may be disposed on the entire front surface104, and in this case, the display screen 105 is a full screen. The rearcamera 19 is not required to be disposed on the back surface of thehousing 101, so that the back surface of the housing 101 is excellent inoverall integrity and the appearance is improved.

In embodiments of the present disclosure, the width W1 of the bracket 11is equal to the width W2 of the housing 101. The bracket 11 may be anintegrative structure to fix the light sensor 17, the infrared filllight 14, the infrared camera 12, the proximity sensor 18, the receiver16, the rear camera 19, the visible light fill light 191, the frontcamera 15 and the structured light projector 13. Or, the bracket 11 mayinclude a first sub-bracket structure to fix the light sensor 17, theinfrared fill light 14, the infrared camera 12, the proximity sensor 18,the receiver 16, the front camera 15 and the structured light projector13, and a second sub-bracket structure to fix the rear camera 19 and thevisible light fill light 191, and the first sub-bracket is combined withthe second sub-bracket. In detail, the first sub-bracket and the secondsub-bracket are connected together by at least one or more combinationsof screwing, snapping, gluing, and welding. The bracket 11 is providedwith a light-passing hole (not shown) at one end corresponding to thehead portion 102 (the top surface of the bracket 11), and the lightsensor 17 is mounted at a position corresponding to the light-passinghole, such that the light outside of the electronic device 100 (or thebracket 11) can be transmitted to the light sensor 17.

As illustrated in FIG. 6, in some embodiments, the acts of obtaining thelaser pattern by the structured light projector 13 and the infraredcamera 12 and obtaining the depth image according to the laser pattern(the acts at blocks 0521 and 0522) include the followings.

At block 05211, a laser light is projected by a structured lightprojector 13.

At block 05212, a laser pattern modulated by an object is obtained bythe infrared camera 12.

At block 05221, a depth image is obtained by processing the laserpattern.

The act at block 05211 may be implemented by the structured lightprojector 13. The act at block 05212 may be implemented by the infraredcamera 12. The act at block 05221 may be implemented by the processor40. In other words, the structured light projector 13 is configured toproject the laser light, the infrared camera 12 is configured to obtainthe laser pattern modulated by the object, and the processor 40 isconfigured to process the laser pattern to obtain the depth image.

The processor 40 may store calibration information of the laser lightprojected by the structured light projector 13. The processor 40 obtainsdepth information of the target object at different positions byprocessing the laser pattern and the calibration information, andgenerates the depth image. The laser light projected by the structuredlight projector 13 may be infrared light, and the laser pattern isdifferent when the laser light is projected onto different materials formodulation.

For example, when the laser is projected onto human skin, rubber, andwood, the laser pattern obtained after the laser is modulated isdifferent. Therefore, the material information of the target object canalso be reflected in the depth image. Only when the material is humanskin, the depth image can match the depth template to pass theverification.

As illustrated in FIG. 3, in some embodiments, the acts of determiningwhether a human face exists in the infrared image is performed in aTrusted Execution Environment (TEE) 41; and/or

determining whether the human face in the infrared image matches theface template of the authorized user is performed in the TEE 41; and/or

determining whether the depth image matches the depth template of theauthorized user is performed in the TEE 41.

The act at block 04, and/or the act at block 051, and/or the act atblock 0523 may be performed in the TEE 41. In detail, the processor 40is further configured to form the TEE 41 and a Rich ExecutionEnvironment (REE) 42. The codes and memory regions in the TEE 41 areboth controlled by the access control unit and are not accessible byprograms in the REE 42. In detail, the TEE 41 can receive an image(infrared image or depth image) transmitted by the infrared camera 12 tothe TEE 41, and output a comparison result, and the image data and theprogram in the TEE 41 cannot be accessed by programs in the REE 42.

In detail, when the act of determining whether a human face exists inthe infrared image (the act at block 04) is performed in the TEE 41, theinfrared image is transmitted to the TEE 41 for processing to determinewhether a human face exists in the infrared image, and the comparisonresult (i.e., a human face exists in the infrared image, or no humanface exists in the infrared image) is output by the TEE 41. When the actof determining whether the human face in the infrared image matches theface template of the authorized user (the act at block 051) is performedin the TEE 41, the infrared image is transmitted to the TEE 41 forprocessing to determine whether the human face in the infrared imagematches the face template of the authorized user, and the comparisonresult (i.e., the human face in the infrared image matches the facetemplate of the authorized user, or the human face in the infrared imagedoes not match the face template of the authorized user) is output bythe TEE 41. When the act of determining whether the depth image matchesthe authorized user's depth template (the act at block 0523) isperformed in the TEE 41, the depth image is transmitted to the TEE 41for processing to determine whether the depth image matches the depthtemplate of the authorized user, and the comparison result (i.e., thedepth image matches the depth template of the authorized user, or thedepth image does not match the depth template of the authorized user) isoutput by the TEE 41. The comparison result may be transmitted to theREE 42.

The act at block 04, and/or the act at block 051, and/or the act atblock 0523 may be performed in the TEE 41, thereby reducing the risk ofleakage of the depth image and/or the infrared image caused by the depthimage and/or infrared image being read by the REE 42, and improving thesecurity of the electronic device 100.

In some embodiments, the processor 40 includes an application processor(AP) 43 and a microprocessor 44. Both the TEE 41 and the REE 42 areformed on the application processor 43. The microprocessor 44 is coupledto the infrared camera 12 and is configured to obtain the infrared imageand the laser pattern. The microprocessor 44 processes the laser patternto obtain the depth image. In detail, the microprocessor 44 may storethe calibration information of the laser light projected by thestructured light projector 13. The microprocessor 44 processes the laserpattern and the calibration information to obtain depth information ofthe target object at different positions and generate the depth image.In detail, the microprocessor 44 and the infrared camera 12 may becoupled via an Inter-Integrated Circuit (I2C) bus 50. The microprocessor44 may provide the infrared camera 12 with a clock signal for collectinginfrared images. The infrared images and the laser patterns collected bythe infrared camera 12 may be transmitted to the microprocessor 44 via aMobile Industry Processor Interface (MIPI) 441. The microprocessor 44 isalso coupled to the structured light projector 13, and in particular,the structured light projector 13 may be coupled to a Pulse WidthModulation (PWM) interface 442 of the microprocessor 44. Themicroprocessor 44 is coupled to the application processor 43 andtransmits the infrared images and the depth images to the TEE 41. Inother embodiments, the structured light projector 13 may also be coupledto the application processor 43, and the application processor 43 may beconfigured to enable the structured light projector 13, and is coupledto the structured light projector 13 via the I2C bus 50.

The microprocessor 44 may be a processing chip, and the applicationprocessor 43 may be configured to reset the microprocessor 44, wake themicroprocessor 44, debug the microprocessor 44, and the like. Themicroprocessor 44 may be coupled to the application processor 43 via theMIPI 441. In detail, the microprocessor 44 is coupled to the TEE 41 ofthe application processor 43 via the MIPI 441, to transmit data directlyfrom the microprocessor 44 to the TEE 41.

The microprocessor 44 may obtain the infrared image by receiving theinfrared image collected by the infrared camera 12, and themicroprocessor 44 may transmit the infrared image to the TEE 41 throughthe MIPI 441. The infrared image output by the microprocessor 44 wouldnot enter the REE 42 of the application processor 43, so that theinfrared image cannot be received by other programs, improving theinformation security of the electronic device 100. Meanwhile, theapplication processor 43 determines whether the human face in theinfrared image matches the face template in the TEE 41, and then outputsthe comparison result. In the process of determining whether the humanface matches the face template, the infrared image and the face templatecannot be obtained, tampered with or stolen by other programs, and theinformation security of the electronic device 100 is further improved.Similarly, the depth image and the depth template cannot be obtained,tampered with or stolen by other programs, thereby improving theinformation security of the electronic device 100.

When the electronic device 100 includes the infrared fill light 14, theinfrared fill light 14 may be coupled to the application processor 43through the I2C bus 50, and the application processor 43 may beconfigured to enable the infrared fill light 14. The infrared fill light14 may also be coupled to the microprocessor 44. In detail, the infraredfill light 14 may be coupled to the PWM interface 442 of themicroprocessor 44.

As illustrated in FIGS. 2 and 7, in some embodiments, the verificationmethod further includes the following operations.

At block 071, when the human face in the infrared image does not matchthe face template of the authorized user, it is determined that theverification is failed.

At block 072, when the depth image does not match the depth template ofthe authorized user, it is determined that the verification is failed.

The processor 40 is further configured to implement the acts at blocks071 and 072. In other words, the processor 40 is configured to determinethat the verification is failed, when the human face in the infraredimage does not match the face template of the authorized user. Or, theprocessor 40 is configured to determine that the verification is failed,when the depth image does not match the depth template of the authorizeduser. In other embodiments, the verification method further includesdetermining that the verification is failed when there is no human facein the infrared image.

In detail, when the human face in the infrared image does not match theface template of the authorized user, or when the depth image does notmatch the depth template of the authorized user, it is not required toperform the act at block 06. When the verification on the processor 40fails, the processor 40 may control the display screen 105 to displaythe prompt message “verification fails, please enter again”, or theprocessor 40 may control the electronic device 100 to generate apredetermined vibration to prompt the user that the verification isfailed. In this case, the movable component 10 may remain the state ofextending out from the housing 101; or, the movable component 10 mayalso move back into the housing 101.

As illustrated in FIG. 8, in some embodiments, the verification methodfurther includes any one of the following operations.

At block 081, when there is no human face in the infrared image, the actof obtaining the infrared image by the infrared camera 12 (the act atblock 03) is returned to.

At block 082, when the human face in the infrared image does not matchthe face template of the authorized user, the act of obtaining theinfrared image by the infrared camera 12 (the act at block 03) isreturned to.

At block 083, when the depth image does not match the depth template ofthe authorized user, the act of obtaining the infrared image by theinfrared camera 12 (the act at block 03) is returned to.

In detail, the infrared camera 12 is further configured to obtain a newinfrared image, when there is no human face in the infrared image, orwhen the human face in the infrared image does not match the facetemplate of the authorized user, or when the depth image does not matchthe depth template of the authorized user. For example, after theinfrared camera 12 obtains the infrared image, when the processor 40 (orthe second determining module 22) determines that the infrared imagedoes not have a human face, the infrared camera 12 reobtains an infraredimage (returns to perform the act at block 03); after the infraredcamera 12 obtains the infrared image, and the processor 40 (or thesecond determining module 22) determines that the infrared image has ahuman face, when the processor 40 (or the third determining module 23)determines that the human face in the infrared image does not match theface template of the authorized user, the infrared camera 12 reobtainsan infrared image (returns to perform the act at block 03); after theinfrared camera 12 obtains the infrared image, and the processor 40determines that the infrared image has a human face and determines thehuman face in the infrared image matches the face template of theauthorized user, when the processor 40 (or the fourth determining module24) determines that the depth image does not match the depth template ofthe authorized user, the infrared camera 12 reobtains an infrared image(returns to perform the act at block 03). In other embodiments, theverification method further includes: when the human face in theinfrared image matches the face template of the authorized user, and thedepth image does not match the depth template of the authorized user,returning to perform the act of obtaining the laser pattern by thestructured light projector 13 and the infrared camera 12 (the act atblock 0521).

In the electronic device 100, the verification device 200 and theverification method of the present embodiment, the infrared camera 12 isfurther to obtain a new infrared image, when there is no human face inthe infrared image, or when the human face in the infrared image doesnot match the face template of the authorized user, or when the depthimage does not match the depth template of the authorized user. Themovable component 10 is not required to retract into the housing 101 andthen extend out from the housing 101 to enable the infrared camera 12 toobtain the infrared image, thereby reducing the execution time of theverification method.

As illustrated in FIG. 9, in some embodiments, after the infrared camera12 continuously collects the infrared images for a predetermined numberof times, the verification method further includes any one of thefollowing operations.

At block 090, when there is no human face in the infrared image, themovable component 10 moves to be received into the housing 101.

At block 091, when the human face in the infrared image does not matchthe face template of the authorized user, the movable component 10 movesto be received in the housing 101.

At block 092, when the depth image does not match the depth template ofthe authorized user, the movable component 10 moves to be received intothe housing 101.

In detail, after the infrared camera 12 continuously collects theinfrared images for a predetermined number of times, the movablecomponent 10 is further configured to move to be received into thehousing 101, when there is no human face in the infrared image, or whenthe human face in the infrared image does not match the face template ofthe authorized user, or when the depth image does not match the depthtemplate of the authorized user.

The predetermined number of times may be two, three, four, five or anyvalue. The present embodiment is exemplified by taking two as anexample. When the movable component 10 is received in the housing 101,and the movable component 10 is triggered, the movable component 10extends out from the housing 101 to expose the infrared camera 12outside of the housing 101, the infrared camera 12 obtains an infraredimage for the first time, and when there is no human face in theinfrared image, the movable component 10 remains exposed outside of thehousing 101. In this case, the infrared camera 12 obtains the infraredimage for the second time (the act at block 03 is executed again); whenthe infrared image obtained by the infrared camera 12 at the second timedoes not have a human face, the movable component 10 moves to bereceived in the housing 101. When the movable component 10 is receivedin the housing 101 and the movable component 10 is triggered, themovable component 10 extends out from the housing 101 to expose theinfrared camera 12 outside the housing 101, and the infrared camera 12obtains the infrared image for the first time. When the infrared imagedoes not have a human face, the movable component 10 remains exposedoutside of the housing 101. In this case, the infrared camera 12 obtainsthe infrared image for the second time (the act at block 03 is executedagain). When the infrared image obtained by the infrared camera 12 atthe second time has a human face, but the human face in the infraredimage does not match the face template, the movable component 10 movesto be received in the housing 101. When the movable component 10 isreceived in the housing 101 and the movable component 10 is triggered,the movable component 10 extends out from the housing 101 to expose theinfrared camera 12 outside of the housing 101, and the infrared camera12 obtains the infrared image for the first time. When the infraredimage does not have a human face, the movable component 10 remainsexposed outside the housing 101. In this case, the infrared camera 12obtains the infrared image for the second time (the act at block 03 isexecuted again). When the infrared image obtained by the infrared camera12 for the second time has a human face and the human face in theinfrared image matches the face template of the authorized user, but thedepth image obtained by the structured light projector 13, the infraredcamera 12, and the processor 40 (the obtaining module 27) does not matchthe depth template, the movable component 10 moves to be received in thehousing 101.

When the movable component 10 starts moving toward the inside of thehousing 101, the infrared camera 12 and the structured light projector13 are both turned off. In other words, after the infrared camera 12continuously collects infrared images for a predetermined number oftimes, the movable component 10 is further configured to turn off theinfrared camera 12 and the structured light projector 13, when there isno human face in the infrared image, or when the human face in theinfrared image does not match the face template of the authorized user,or when the depth image does not match the depth template of theauthorized user.

In the electronic device 100 and the verification method of the presentembodiment, after the infrared camera 12 continuously collects theinfrared images for a predetermined number of times, the movablecomponent 10 is further configured to move to be received in the housing101, when there is no human face in the infrared image, or when thehuman face in the infrared image does not match the face template of theauthorized user, or when the depth image does not match the depthtemplate of the authorized user, thereby avoiding continuous working ofthe infrared camera 12 and/or the structured light projector 13 aftermultiple verification failures, and avoiding affecting the appearance ofthe electronic device 100 when the movable component 10 remains exposedoutside of the housing 101.

As illustrated in FIGS. 10 and 11, in some embodiments, a referenceposition is provided on the bracket 11, and moving the infrared camera12 and the structured light projector 13 toward the outside of thehousing 101 along with the bracket to extend from the housing 101 (theact at block 021) includes the following operations.

At block 0211, it is determined whether a reference position on themovable component 10 reaches a preset position.

At block 0212, when the reference position reaches the preset position,the bracket 11 stops moving.

The electronic device 100 further includes a detecting component 26. Thereference position is provided on the bracket 11. The detectingcomponent 26 is configured to detect whether the reference position onthe movable component 10 reaches the preset position. When the referenceposition reaches the preset position, the bracket 11 stops moving.

The reference position may be a position at which the limiting portion(e.g., the limiting protrusion) on the bracket 11 and the positioningportion (e.g., the positioning groove) are located. The preset positionis a fixed position relative to the housing 101. In detail, the presetposition may be a position at which the limiting portion (e.g., thelimiting protrusion) on the housing 101 is located. When the movablecomponent 10 is received in the housing 101, the distance between thereference position and the preset position is the maximum stroke of themovable component 10. The detecting component 26 may be a detectingcircuit connected with a position switch (which may be a travel switch),the position switch is set at the preset position, and the bracket 11 isprovided with a protruding portion capable of triggering the positionswitch at the reference position. When the reference position of thebracket 11 moves to the preset position, the bracket 11 triggers theposition switch, which is detected by the detecting circuit, so that thedetecting component 26 can detect whether the reference position of thebracket 11 moves to the preset position.

As illustrated in FIG. 11, in some embodiments, the detection component26 includes a magnetic element 261, and a Hall sensor 262. The magneticelement 261 is disposed at the reference position. The Hall sensor 262is disposed at the preset position. In detail, when the magnetic element261 moves to the preset position, the magnetic element 261 is alignedwith the Hall sensor 262 and makes the signal on the Hall sensor 262changed. It is possible to determine whether the magnetic element 261(or the bracket 11) reaches the preset position according to the signalchange of the Hall sensor 262.

As illustrated in FIG. 12, embodiments of the present disclosure furtherprovide a computer readable storage medium 60. The computer readablestorage medium 60 is applied to the verification device 200 in theabove-described embodiments. The computer readable storage medium 60 isconfigured to store one or more computer executable instructions. Whenthe one or more computer executable instructions are executed by theprocessor 40, the processor 40 implements the following operations of:

01, determining whether the movable component 10 is triggered;

02, when the movable component 10 is triggered, controlling the bracket11 to move toward the outside of the housing 101 along with the infraredcamera 12 and the structured light projector 13 to enable the infraredcamera 12 and the structured light projector 13 to extend out from thehousing 101, and controlling the infrared camera 12 and the structuredlight projector 13 to be initialized;

03, controlling the infrared camera 12 to obtain an infrared image;

04, determining whether a human face exists in the infrared image;

051, when a human face exists in the infrared image, determining whetherthe human face matches a face template of an authorized user;

052, when the human face matches the face template of the authorizeduser, controlling the structured light projector 13 and the infraredcamera 12 to obtain a laser pattern, obtaining a depth image accordingto the laser pattern, and determining whether the depth image matchesthe depth template of the authorized user; and

06, when the depth image matches the depth template of the authorizeduser, determining that the verification is passed.

When the one or more computer executable instructions are executed bythe processor 40, the processor 40 may further implement the followingoperations of:

05211, controlling the structured light projector 13 to project laserlight;

05212, controlling the infrared camera 12 to obtain the laser patternafter modulation by an object; and

05221, processing the laser pattern to obtain the depth image.

When the one or more computer executable instructions are executed bythe processor 40, the processor 40 may further implement the followingoperations of:

071, when the human face in the infrared image does not match the facetemplate of the authorized user, determining that the verification isfailed; or

072, when the depth image does not match the depth template of theauthorized user, determining that the verification is failed.

When the one or more computer executable instructions are executed bythe processor 40, the processor 40 may further implement the followingoperations of:

081, when there is no human face in the infrared image, returning to theact of obtaining the infrared image by the infrared camera 12 (the actat block 03); or

082, when the human face in the infrared image does not match the facetemplate of the authorized user, returning to the act of obtaining theinfrared image by the infrared camera 12 (the act at block 03); or

083, when the depth image does not match the depth template of theauthorized user, returning to the act of obtaining the infrared image bythe infrared camera 12 (the act at block 03).

After the infrared camera 12 continuously collects the infrared imagesfor a predetermined number of times, when the one or more computerexecutable instructions are executed by the processor 40, the processor40 may further implement the following operations of:

090, when there is no human face in the infrared image, controlling themovable component 10 to move to be received into the housing 101; or

091, when the human face in the infrared image does not match the facetemplate of the authorized user, controlling the movable component 10 tomove to be received in the housing 101; or

092, when the depth image does not match the depth template of theauthorized user, controlling the movable component 10 to move to bereceived into the housing 101.

When the one or more computer executable instructions are executed bythe processor 40, the processor 40 may further implement the followingoperations of:

0211, determining whether the reference position on the movablecomponent 10 reaches the preset position; and

0212, when the reference position reaches the preset position,controlling the bracket 11 to stop moving.

In a second embodiment of the present disclosure, when a human faceexists in the infrared image, determining whether the human face matchesthe face template of the authorized user, obtaining the laser pattern bythe structured light projector 13 and the infrared camera 12, obtainingthe depth image according to the laser pattern, and determining whetherthe depth image matches the depth template of the authorized user (theact at block 05) may be performed as follows.

At block 053, when a human face exists in the infrared image, it isdetermined whether the human face matches the face template of theauthorized user, and at the same time, the laser pattern is obtained bythe structured light projector 13 and the infrared camera 12, the depthimage is obtained according to the laser pattern, and it is determinedwhether the depth image matches the depth template of the authorizeduser.

As illustrated in FIGS. 1, 3 and 13, in other words, the verificationmethod of the second embodiment of the preset disclosure includes thefollowing operations.

At block 01, it is determined whether the movable component 10 istriggered. The movable component 10 is received in the housing 101 andcapable of extending out from the housing 101. The movable component 10includes the bracket 11, the infrared camera 12 disposed on the bracket11, and the structured light projector 13 disposed on the bracket 11.

At block 02, when the movable component 10 is triggered, the infraredcamera 12 and the structured light projector 13 are driven to movetoward the outside of the housing 101 along with the bracket 11 toextend from the housing 101, and the infrared camera 12 and thestructured light projector 13 are initialized.

At block 03, an infrared image is obtained by the infrared camera 12.

At block 04, it is determined whether a human face exists in theinfrared image.

At block 053, when a human face exists in the infrared image, it isdetermined whether the human face matches the face template of theauthorized user, and at the same time, the laser pattern is obtained bythe structured light projector 13 and the infrared camera 12, the depthimage is obtained according to the laser pattern, and it is determinedwhether the depth image matches the depth template of the authorizeduser.

At block 06, when the human face matches the face template of theauthorized user, and the depth image matches the depth template of theauthorized user, it is determined that the verification is passed.

The act at block 02 includes the followings.

At block 021, the infrared camera 12 and the structured light projector13 are moved toward the outside of the housing 101 along with thebracket to extend from the housing 101.

At block 022, the infrared camera 12 and the structured light projector13 are initialized.

The act at block 053 includes the followings.

At block 0531, when there is a human face in the infrared image, it isdetermined whether the human face matches the face template of theauthorized user.

At block 0532, when there is a human face in the infrared image, thelaser pattern is obtained by the structured light projector 13 and theinfrared camera 12.

At block 0533, the depth image is obtained according to the laserpattern.

At block 0534, it is determined whether the depth image matches thedepth template of the authorized user.

The act at block 0531 is performed synchronously with the act at block0532. Here, “performed synchronously” means that the startup time of thetwo acts is the same. In detail, the startup time is a certain timeafter determining that there is a human face in the infrared image.

As illustrated in FIGS. 2 and 3, the electronic device 100 ofembodiments of the present disclosure includes the housing 101, themovable component 10, and the processor 40. The movable component 10includes the bracket 11, the infrared camera 12, and the structuredlight projector 13. The processor 40 is coupled to the infrared camera12 and the structured light projector 13 respectively. The movablecomponent 10 is received in the housing 101 and capable of extending outfrom the housing 101. In detail, the housing 101 includes a head portion102 and a tail portion 103 opposed to the head portion 102. The housing101 further includes a front surface 104 coupling the head portion 102and the tail portion 103, and a back surface (not shown) opposed to thefront surface 104. A display screen 105 is provided on the front surface104, the display screen 105 is a full screen, and the movable component10 is disposed at one end of the housing 101 where the head portion 102is. The electronic device 100 includes any one of a mobile phone, atablet computer, a smart bracelet, and a smart helmet. The electronicdevice 100 of embodiments of the present disclosure is exemplified bytaking a mobile phone as an example.

The processor 40 is configured to determine whether the movablecomponent 10 is triggered; when the movable component 10 is triggeredand the infrared camera obtains an infrared image, determine whether ahuman face exists in the infrared image; when a human face exists in theinfrared image, determine whether the human face matches the facetemplate of the authorized user; when a human face exists in theinfrared image and the infrared camera 12 and the structured lightprojector 13 obtains the laser patter, obtain the depth image accordingto the laser pattern; determine whether the depth image matches thedepth template of the authorized user; when the human face matches theface template of the authorized user, and the depth image matches thedepth template of the authorized user, determine that the verificationis passed. In other words, the acts at blocks 01, 04, 0531, 0533, 0534and 06 may be implemented by the processor 40.

When the movable component 10 is triggered, the bracket 11 moves withthe infrared camera 12 and the structured light projector 13 toward theoutside of the housing 101 to enable the infrared camera 12 and thestructured light projector 13 to extend out from the housing 101. Theinfrared camera 12 and the structured light projector 13 areinitialized. In other words, the act at block 021 may be implemented bythe bracket 11, the act at block 022 may be implemented by the infraredcamera 12 and the structured light projector 13 together, and the act atblock 02 may be implemented by the bracket 11, the infrared camera 12and the structured light projector 13 together. First, the bracket 11moves with the infrared camera 12 and the structured light projector 13toward the outside of the housing 101 to enable the infrared camera 12and the structured light projector 13 to extend out from the housing101, and then the infrared camera 12 and the structured light projector13 are initialized. In other words, the act at block 021 is performedbefore the act at block 022. In another case, the bracket 11 moves withthe infrared camera 12 and the structured light projector 13 toward theoutside of the housing 101 to enable the infrared camera 12 and thestructured light projector 13 to extend out from the housing 101, whilethe infrared camera 12 and the structured light projector 13 areinitialized. In other words, the acts at blocks 021 and 022 areperformed at the same time, which brings the preparation time(initialization) of the infrared camera 12 and the structured lightprojector 13 forward to reduce the overall execution time of theverification method, compared to performing the act at block 021 beforethe act at block 022.

The infrared camera 12 is capable of obtaining the infrared image. Indetail, the infrared camera 12 is configured to obtain the infraredimage after the movable component 10 is triggered. In other words, theact at block 03 may be implemented by the infrared camera 12.

The infrared camera 12 and the structured light projector 13 may beconfigured together to obtain the laser pattern. In detail, the infraredcamera 12 and the structured light projector 13 are configured togetherto obtain the laser pattern when the human face exists in the infraredimage. In other words, the act at block 0532 may be implemented by theinfrared camera 12 and the structured light projector 13 together.

The operation of triggering the movable component 10 includes: movingand/or turning the electronic device 100 in a predetermined manner(e.g., the user turns the head portion 102 toward the side of the frontsurface 104); lighting up the display screen 105 (e.g., when the displayscreen 105 is in a black-out state, the user lights up the displayscreen 105 by pressing a button on the electronic device 100 or the userlights up the display screen 105 by double clicking the display screen105); opening the face detection application in the electronic device100 (e.g., the user opens/clicks the face detection application orsoftware in the electronic device 100, in detail, when the user uses theelectronic device 100, the user can open the user verification softwarein the electronic device 100 to identify the face of the user todetermine whether the user has the right to use the electronic device100); and clicking a button/key for starting the face detection in theapplication running in the electronic device 100 (e.g., when the useruses the payment software, the user clicks a button in the paymentsoftware to make payment by scanning the face). In detail, the operationof triggering the movable component 10 is also an operation of startingthe infrared camera 12 and the structured light projector 13. In otherwords, the infrared camera 12 and the structured light projector 13 areturned on when the user performs the above operations (moving and/orturning the electronic device 100 in a predetermined manner, lighting upthe display screen 105, opening the face detection application in theelectronic device 100, clicking a button/key for starting the facedetection in the application running in the electronic device 100), andthe initialization operation starts after the infrared camera 12 and thestructured light projector 13 are turned on. When the user needs toperform face recognition using the infrared camera 12 and the structuredlight projector 13, the user performs the above operations (movingand/or turning the electronic device 100 in a predetermined manner,lighting up the display screen 105, opening the face detectionapplication in the electronic device 100, clicking a button/key forstarting the face detection in the application running in the electronicdevice 100) that generate a trigger signal for triggering the movablecomponent 10, and the processor 40 may determine whether the movablecomponent 10 is triggered according to whether the trigger signal isreceived.

The electronic device 100 further includes a driving component 31disposed within the housing 101 and coupled to the bracket 11. Thedriving component 31 is configured to drive the bracket 11 to move. Thedriving component 31 includes a drive motor. The processor 40 is coupledto the driving component 31 and controls the driving component 31 todrive the movable component 10 to move when the movable component 10 istriggered.

The initialization of the infrared camera 12 and the structured lightprojector 13 includes starting the driving procedure of the infraredcamera 12 to prepare the infrared camera 12 for shooting, and startingthe driving procedure of the structured light projector 13 to preparethe structured light projector 13 for projecting the infrared laser.

The infrared camera 12 may obtain an infrared image when the bracket 11moves into position and stops moving. Since the infrared image isobtained when the bracket 11 is stable, the infrared image is relativelyclear, which is advantageous for performing subsequent facedetermination and reduces repeated shooting of infrared images. Theinfrared camera 12 may also obtain an infrared image when the infraredcamera 12 is completely exposed outside the housing 101 and the bracket11 has not stopped moving. For example, when the infrared camera 12 iscompletely exposed outside the housing 101 and the moving speed of thebracket 11 is less than one-third of the maximum speed of the bracket11, the infrared camera 12 obtains an infrared image, and thus, the timefor shooting the image is advanced, which further reduces the overallexecution time of the verification method, and improves the userexperience.

The act of determining whether a human face exists in the infrared imagemay include: performing feature extraction on the infrared image byusing a specific algorithm, matching the extracted feature with a knownface feature vector, and determining whether the infrared image is aface image according to the matching result. The features of theinfrared image can be extracted by an active shape model (ASM), a localbinary patterns (LBP) algorithm, a principal component analysis (PCA)algorithm and a linear discriminant analysis (LDA) algorithm.

The authorized user may be the owner of the electronic device 100 or afriend or a relative of the owner. The face template of the authorizeduser may be a face template pre-stored inside or outside the electronicdevice 100. The face template may be an infrared image of the face ofthe authorized user, and the infrared image of the human face may be aflat image.

When the face exists in the infrared image, the structured lightprojector 13 is configured to project a laser light to the target object(the outside of the electronic device 100), and the laser pattern of thetarget object is obtained by the infrared camera 12. The depth templateof the authorized user may be a face depth template pre-stored inside oroutside the electronic device 100. The depth template may be a facedepth image of the authorized user, and the face depth image may beobtained by structured light detection.

When the processor 40 determines that the infrared image matches theface template of the authorized user, it can be considered that theinfrared image currently input by the user and the pre-stored facetemplate are from the same user. However, since the face template andthe infrared image are both flat images, the infrared image is easy toforge. For example, verification may be performed with a two-dimensionalphotograph. Therefore, it is further determined by the processor 40whether the depth image of the target object matches the depth templateof the authorized user, which better verifies whether the current useris the user in the pre-stored depth template. When the processor 40determines that the depth image matches the depth template of theauthorized user, it is determined that the verification is passed. Afterthe verification is passed, the current user can obtain thecorresponding operation authority of the electronic device 100, such asscreen unlocking, payment, and the like.

In the existing mobile phone, in order to make the display screen on thefront of the mobile phone a full screen, the camera component can beselectively hidden inside the mobile phone or exposed outside the mobilephone. In this case, when face unlocking is performed by using thecamera component, the face unlocking takes a long time, resulting in apoor user experience.

In the electronic device 100, the verification device 200 and theverification method of the embodiments of the present disclosure, afterdetermining that a human face exists in the infrared image, the act ofdetermining whether the human face matches the face templet of theauthorized user, and the act of obtaining the laser pattern by thestructured light projector 13 and the infrared camera 12 are performedat the same time, which reduces the execution time of the verificationmethod and enhances the verification speed.

As illustrated in FIGS. 2, 4 and 13, embodiments of the presentdisclosure further provide a verification device 200. The verificationdevice 200 includes the first determining module 21, the seconddetermining module 22, the third determining module 23, the fourthdetermining module 24, the verifying module 25 and the obtaining module27.

The first determining module 21 is configured to determine whether themovable component 10 is triggered. In other words, the act at block 01may be implemented by the first determining module 21.

The second determining module 22 is configured to determine whether ahuman face exists in the infrared image after the infrared camera 12obtains the infrared image. In other words, the act at block 04 may beimplemented by the second determining module 22.

The third determining module 23 is configured to determine whether thehuman face matches the face template of the authorized user when thehuman face exists in the infrared image. In other words, the act atblock 0531 may be implemented by the third determining module 23.

The obtaining module 27 is configured to obtain the depth imageaccording to the laser pattern, when the human face exists in theinfrared image. In other words, the act at block 0533 may be implementedby the obtaining module 27.

The fourth determining module 24 is configured to determine whether thedepth image matches the depth template of the authorized user. In otherwords, the act at block 0534 may be implemented by the fourthdetermining module 24. In other words, the act at block 053 may beimplemented by the infrared camera 12 and the structured light projector13, the third determining module 23, the obtaining module 27 and thefourth determining module 24 together.

The verifying module 25 is configured to determine that the verificationis passed, when the depth image matches the depth template of theauthorized user, and the human face matches the face template of theauthorized user. In other words, the act at block 06 may be implementedby the verifying module 25.

The act at block 021 may be implemented by the bracket 11. The act atblock 022 may be implemented by the infrared camera 12 and thestructured light projector 13 together. The act at block 02 may beimplemented by the bracket 11, the infrared camera 12 and the structuredlight projector 13 together. The act at block 03 may be implemented bythe infrared camera 12. The act at block 0532may be implemented by theinfrared camera 12 and the structured light projector 13 together.

The acts implemented by the first determining module 21, the seconddetermining module 22, the third determining module 23, the fourthdetermining module 24, the verifying module 25 and the obtaining module27 may also be implemented by the processor 40.

The first determining module 21 is coupled to the driving component 31,the infrared camera 12 and the structured light projector 13respectively, so that after the first determining module 21 determinesthat the movable component 10 is triggered, the first determining module21 can transmit a signal to the driving component 31, the infraredcamera 12 and the structured light projector 13 to drive the drivingcomponent 31, the infrared camera 12 and the structured light projector13 to implement the act at block 02.

The second determining module 22 is coupled to the infrared camera 12and the structured light projector 13 respectively, so that the infraredimage obtained by the infrared camera 12 can be transmitted to thesecond determining module 22, and the second determining module 22 cantransmit a signal to the infrared camera 12 and the structured lightprojector 13 after determining that a human face exists in the infraredimage, to drive the infrared camera 12 and the structured lightprojector 13 to implement the act at block 0532.

The obtaining module 27 is coupled to the infrared camera 12 and thefourth determining module 24 respectively, so that the obtaining module27 can receive the laser pattern obtained by the infrared camera 12, andthe obtaining module 27 can transmit the depth image to the fourthdetermining module 24 after generating the depth image.

In the verification device 200, the electronic device 100 and theverification method of the embodiments of the present disclosure, afterdetermining that a human face exists in the infrared image, the act ofdetermining whether the human face matches the face templet of theauthorized user and the act of obtaining the laser pattern by thestructured light projector 13 and the infrared camera 12 are performedat the same time, which reduces the execution time of the verificationmethod and enhances the verification speed.

As illustrated in FIGS. 2 and 3, in some embodiments, the movablecomponent 10 further includes an infrared fill light 14, and theinfrared fill light 14 may be configured to emit infrared light to theoutside, and the infrared light is received by the infrared camera 12after being reflected by the object. In detail, when the infrared camera12 is configured to obtain an infrared image, the infrared fill light 14is configured to emit infrared light outward to enhance the intensity ofthe infrared light received by the infrared camera 12 after modulationby the object, thereby improving the sharpness of the infrared image.

As illustrated in FIGS. 2 and 3, in some embodiments, the movablecomponent 10 further includes at least one of a front camera 15, areceiver 16, a light sensor 17, a proximity sensor 18, a rear camera 19,and a visible light fill light 191. Thus, the front camera 15, thereceiver 16, the light sensor 17, or the proximity sensor 18 are notrequired to be disposed on the front surface 104 of the housing 101, sothat the display screen 105 can be disposed on the entire front surface104, in which case the display screen 105 is a full screen. The rearcamera 19 is not required to be disposed on the back surface of thehousing 101, so that the back surface of the housing 101 is excellent inoverall integrity and the appearance is improved.

In the present embodiment, the width W1 of the bracket 11 is equal tothe width W2 of the housing 101. The bracket 11 may be an integrativestructure to fix the light sensor 17, the infrared fill light 14, theinfrared camera 12, the proximity sensor 18, the receiver 16, the rearcamera 19, the visible light fill light 191, the front camera 15 and thestructured light projector 13. Or, the bracket 11 may include a firstsub-bracket structure to fix the light sensor 17, the infrared filllight 14, the infrared camera 12, the proximity sensor 18, the receiver16, the front camera 15 and the structured light projector 13, and asecond sub-bracket structure to fix the rear camera 19 and the visiblelight fill light 191, and the first sub-bracket is combined with thesecond sub-bracket. In detail, the first sub-bracket and the secondsub-bracket are connected together by at least one or more combinationsof screwing, snapping, gluing, and welding. The bracket 11 is providedwith a light-passing hole (not shown) at one end corresponding to thehead portion 102 (the top surface of the bracket 11), and the lightsensor 17 is mounted at a position corresponding to the light-passinghole, such that the light outside of the electronic device 100 (or thebracket 11) can be transmitted to the light sensor 17.

As illustrated in FIG. 14, in some embodiments, the acts of obtainingthe laser pattern by the structured light projector 13 and the infraredcamera 12 and obtaining the depth image according to the laser pattern(the acts at blocks 0532 and 0533) include the followings.

At block 05321, a laser light is projected by the structured lightprojector 13.

At block 05322, the laser pattern is obtained by the infrared camera 12after modulation by an object.

At block 05331, a depth image is obtained by processing the laserpattern.

The act at block 05321 may be implemented by the structured lightprojector 13. The act at block 05322 may be implemented by the infraredcamera 12. The act at block 05331 may be implemented by the processor40. In other words, the structured light projector 13 is configured toproject the laser light, the infrared camera 12 is configured to obtainthe laser pattern after modulation by an object, and the processor 40 isconfigured to process the laser pattern to obtain the depth image.

The processor 40 may store calibration information of the laser lightprojected by the structured light projector 13. The processor 40 obtainsdepth information of the target object at different positions byprocessing the laser pattern and the calibration information, andgenerates the depth image. The laser light projected by the structuredlight projector 13 may be infrared light, and the laser pattern isdifferent when the laser light is projected onto different materials formodulation. For example, when the laser is projected onto human skin,rubber, or wood, the laser pattern after modulation is different.Therefore, the material information of the target object can also bereflected in the depth image. Only when the material is human skin, thedepth image can match the depth template to pass the verification.

As illustrated in FIG. 3, in some embodiments, determining whether ahuman face exists in the infrared image is performed in the TrustedExecution Environment (TEE) 41; and/or

determining whether the human face in the infrared image matches theface template of the authorized user is performed in the TEE 41; and/or

determining whether the depth image matches the depth template of theauthorized user is performed in the TEE 41.

The act at block 04, and/or the act at block 0531, and/or the act atblock 0534 are performed in the TEE 41. In detail, the processor 40 isfurther configured to form the TEE 41 or the Rich Execution Environment(REE) 42. The codes and memory regions in the TEE 41 are both controlledby the access control unit and are not accessible by programs in the REE42. In detail, the TEE 41 can receive an image (infrared image or depthimage) transmitted by the infrared camera 12 to the TEE 41, and output acomparison result, and the image data and the program in the TEE 41cannot be accessed by programs in the REE 42.

In detail, when the act of determining whether a human face exists inthe infrared image (the act at block 04) is executed in the TEE 41, theinfrared image is transmitted to the TEE 41 for processing to determinewhether a human face exists in the infrared image, and the comparisonresult is output by the TEE 41 (i.e., a human face exists in theinfrared image, or there is no human face in the infrared image); whenthe act of determining whether the human face in the infrared imagematches the face template of the authorized user (the act at block 0531)is executed in the TEE 41, the infrared image is transmitted to the TEE41 for processing to determine whether the human face in the infraredimage matches the face template of the authorized user, and thecomparison result is output by the TEE 41 (i.e., the human face in theinfrared image matches the face template of the authorized user, or thehuman face in the infrared image does not match the face template of theauthorized user); when the act of determining whether the depth imagematches the authorized user's depth template (the act at block 0534) isexecuted in the TEE 41, the depth image is transmitted to the TEE 41 forprocessing to determine whether the depth image matches the depthtemplate of the authorized user, and the comparison result is output bythe TEE 41 (i.e., the depth image matches the depth template of theauthorized user, or the depth image does not match the depth template ofthe authorized user). The comparison results may be transmitted to theREE 42.

In the present embodiment, the act at block 04, and/or the act at block0531, and/or the act at block 0534 are executed in the TEE 41, therebyreducing the risk of leakage of the depth image and/or the infraredimage caused by the depth image and/or the infrared image being read bythe REE 42, and improving the security of the electronic device 100.

In some embodiments, the processor 40 includes an application processor(AP) 43 and a microprocessor 44. Both the TEE 41 and the REE 42 areformed on the application processor 43.

The microprocessor 44 is coupled to the infrared camera 12 and isconfigured to obtain an infrared image and a laser pattern. Themicroprocessor 44 processes the laser pattern to obtain a depth image.In detail, the microprocessor 44 may store the calibration informationof the laser light projected by the structured light projector 13. Themicroprocessor 44 processes the laser pattern and the calibrationinformation to obtain depth information of the target object atdifferent positions and generate the depth image. In detail, themicroprocessor 44 and the infrared camera 12 may be coupled by anInter-Integrated Circuit (I2C) bus 50. The microprocessor 44 may providethe infrared camera 12 with a clock signal for collecting infraredimages. The infrared images and the laser patterns collected by theinfrared camera 12 can be transmitted to the microprocessor 44 via aMobile Industry Processor Interface (MIPI) 441. The microprocessor 44 isalso coupled to the structured light projector 13, and in particular,the structured light projector 13 may be coupled to a Pulse WidthModulation (PWM) interface 442 of the microprocessor 44. Themicroprocessor 44 is coupled to the application processor 43 andtransmits the infrared images and the depth images to the TEE 41. Inother embodiments, the structured light projector 13 may also be coupledto the application processor 43, the application processor 43 may beconfigured to enable the structured light projector 13 and is coupled tothe structured light projector 13 via the I2C bus 50.

The microprocessor 44 may be a processing chip, and the applicationprocessor 43 may be configured to reset the microprocessor 44, wake themicroprocessor 44, debug the microprocessor 44, and the like. Themicroprocessor 44 may be coupled to the application processor 43 via theMIPI 441. In detail, the microprocessor 44 is coupled to the TEE 41 ofthe application processor 43 via the MIPI 441 to transmit data directlyfrom the microprocessor 44 to the TEE 41.

The microprocessor 44 may obtain the infrared image by receiving theinfrared image collected by the infrared camera 12, and themicroprocessor 44 may transmit the infrared image to the TEE 41 throughthe MIPI 441. The infrared image output by the microprocessor 44 wouldnot enter the REE 42 of the application processor 43, so that theinfrared image cannot be received by other programs, and the informationsecurity of the electronic device 100 is improved. Meanwhile, theapplication processor 43 determines whether the human face in theinfrared image matches the face template in the TEE 41, and then outputsthe comparison result. In the process of determining whether the humanface matches the face template, the infrared image and the face templatecannot be obtained, tampered with or stolen by other programs, and thusthe information security of the terminal 100 is further improved.Similarly, the depth image and the depth template cannot be obtained,tampered with or stolen by other programs, thereby improving theinformation security of the electronic device 100.

When the electronic device 100 includes the infrared fill light 14, theinfrared fill light 14 may be coupled to the application processor 43through the I2C bus 50. The application processor 43 may be configuredto enable the infrared fill light 14. The infrared fill light 14 mayalso be coupled to the microprocessor 44. In detail, the infrared filllight 14 may be coupled to the PWM interface 442 of the microprocessor44.

As illustrated in FIGS. 2 and 15, in some embodiments, the verificationmethod further includes the following operations.

At block 073, when the human face in the infrared image does not matchthe face template of the authorized user, the verification is failed,and/or when the depth image does not match the depth template of theauthorized user, the verification is failed.

The act at block 073 may be implemented by the processor 40. In otherwords, the processor 40 is configured to determine that the verificationis failed, when the human face in the infrared image does not match theface template of the authorized user, and/or the processor 40 isconfigured to determine that the verification is failed, when the depthimage does not match the depth template of the authorized user. In otherembodiments, the act at block 073 further includes determining that theverification is failed, when there is no human face in the infraredimage.

In detail, when the human face in the infrared image does not match theface template of the authorized user, or when the depth image does notmatch the depth template of the authorized user, the act at block 06 isnot required to be executed. When the verification on the processor 40fails, the processor 40 may control the display screen 105 to displaythe prompt message “verification fails, please enter again”, or theprocessor 40 may control the electronic device 100 to generate apredetermined vibration to prompt the user that the verification isfailed. In this case, the movable component 10 may remain the state ofextending out from the housing 101; or, the movable component 10 mayalso move back into the housing 101.

As illustrated in FIG. 16, in some embodiments, the verification methodfurther includes at least one of the following operations.

At block 084, when there is no human face in the infrared image, the actof obtaining the infrared image by the infrared camera 12 (the act atblock 03) is returned to.

At block 085, when the human face in the infrared image does not matchthe face template of the authorized user, the act of obtaining theinfrared image by the infrared camera 12 (the act at block 03) isreturned to.

At block 086, when the depth image does not match the depth template ofthe authorized user, the act of obtaining the infrared image by theinfrared camera 12 (the act at block 03) is returned to.

In detail, the infrared camera 12 is further configured to obtain a newinfrared images, when there is no human face in the infrared image, orwhen the human face in the infrared image does not match the facetemplate of the authorized user, and/or when the depth image does notmatch the depth template of the authorized user. For example, after theinfrared camera 12 obtains the infrared image, when the processor 40 (orthe second determining module 22) determines that no human face existsin the infrared image, the infrared camera 12 reacquires the infraredimage (the act at block 03 is executed again); after the infrared camera12 obtains the infrared image, and the processor 40 (or the seconddetermining module 22) determines that a human face exists in theinfrared image, when the processor 40 (or the third determining module23) determines that the human face in the infrared image does not matchthe face template of the authorized user, the infrared camera 12reacquires the infrared image (the act at block 03 is executed again);after the infrared camera 12 obtains the infrared image, and theprocessor 40 determines that the infrared image has a human face anddetermines that the human face in the infrared image matches the facetemplate of the authorized user, when the processor 40 (or the fourthdetermining module 24) determines that the depth image does not matchthe depth template of the authorized user, the infrared camera 12reacquires the infrared image (the act at block 03 is executed again).In other embodiments, the verification method further includes: when thehuman face in the infrared image matches the face template of theauthorized user, and the depth image does not match the depth templateof the authorized user, the act of obtaining the laser pattern by thestructured light projector 13 and the infrared camera 12 is executed(the act at block 0532).

In the verification device 200, the electronic device 100 and theverification method of the present embodiment, the infrared camera 12 isfurther configured to obtain a new infrared image, when there is nohuman face in the infrared image, or when the human face in the infraredimage does not match the face template of the authorized user, and/orwhen the depth image does not match the depth template of the authorizeduser. The movable component 10 is not required to retract into thehousing 101 and then extend out from the housing 101 to enable theinfrared camera 12 to acquire an infrared image, thereby reducing theexecution time of the verification method, and increasing the successrate of verification.

As illustrated in FIG. 17, in some embodiments, after the infraredcamera 12 continuously collects the infrared image for the predeterminednumber of times, the verification method further includes the followingoperations.

At block 093, when there is no human face in the infrared image, themovable component 10 moves to be received into the housing 101; or whenthe human face in the infrared image does not match the face template ofthe authorized user, the movable component 10 moves to be received inthe housing 101; and/or, when the depth image does not match the depthtemplate of the authorized user, the movable component 10 moves to bereceived into the housing 101.

In detail, after the infrared camera 12 continuously collects theinfrared image for the predetermined number of times, the movablecomponent 10 is further configured to move to be received into thehousing 101, when there is no human face in the infrared image, or whenthe human face in the infrared image does not match the face template ofthe authorized user, and/or when the depth image does not match thedepth template of the authorized user.

The predetermined number of times may be two, three, four, five or anyvalue. The present embodiment is exemplified by taking two as anexample. When the movable component 10 is received in the housing 101,and the movable component 10 is triggered, the movable component 10extends out from the housing 101 to expose the infrared camera 12outside of the housing 101, and the infrared camera 12 obtains aninfrared image for the first time. When there is no human face in theinfrared image, the movable component 10 remains exposed outside of thehousing 101. In this case, the infrared camera 12 obtains the infraredimage for the second time (the act at block 03 is executed again). Whenthe infrared image obtained by the infrared camera 12 for the secondtime does not have a human face, the movable component 10 moves to bereceived in the housing 101. When the movable component 10 is receivedin the housing 101 and the movable component 10 is triggered, themovable component 10 extends out from the housing 101 to expose theinfrared camera 12 outside of the housing 101, and the infrared camera12 obtains the infrared image for the first time. When the infraredimage does not have a human face, the movable component 10 remainsexposed outside of the housing 101. In this case, the infrared camera 12obtains the infrared image for the second time (the act at block 03 isexecuted again). When the infrared image obtained by the infrared camera12 for the second time has a human face, but the human face in theinfrared image does not match the face template, the movable component10 moves to be received in the housing 101. When the movable component10 is received in the housing 101 and the movable component 10 istriggered, the movable component 10 extends out of the housing 101 toexpose the infrared camera 12 outside the housing 101, and the infraredcamera 12 obtains the infrared image for the first time. When theinfrared image does not have a human face, the movable component 10remains exposed outside the housing 101. In this case, the infraredcamera 12 obtains the infrared image for the second time (the act atblock 03 is executed again). When the infrared image obtained by theinfrared camera 12 for the second time has a human face, but the depthimage obtained by the structured light projector 13, the infrared camera12, and the processor 40 (the obtaining module 27) does not match thedepth template, the movable component 10 moves to be received in thehousing 101. When the movable component 10 is received in the housing101 and the movable component 10 is triggered, the movable component 10extends out of the housing 101 to expose the infrared camera 12 outsidethe housing 101, and the infrared camera 12 obtains the infrared imagefor the first time. When the infrared image does not have a human face,the movable component 10 remains exposed outside the housing 101. Inthis case, the infrared camera 12 obtains the infrared image for thesecond time (the act at block 03 is executed again). When the infraredimage obtained by the infrared camera 12 for the second time has a humanface, but the human face in the infrared image obtained for the secondtime does not match the face template and the depth image obtained bythe structured light projector 13, the infrared camera 12, and theprocessor 40 (the obtaining module 27) does not match the depthtemplate, the movable component 10 moves to be received in the housing101.

When the movable component 10 starts moving toward the inside of thehousing 101, the infrared camera 12 and the structured light projector13 are both turned off. In other words, after the infrared camera 12continuously collects the infrared image for the predetermined number oftimes, the movable component 10 is further configured to enable theinfrared camera 12 and the structured light projector 13 to be turnedoff, when there is no human face in the infrared image, or when thehuman face in the infrared image does not match the face template of theauthorized user, and/or when the depth image does not match the depthtemplate of the authorized user.

In the verification device 200, the electronic device 100 and theverification method of the present embodiment, after the infrared camera12 continuously collects the infrared image for the predetermined numberof times, the movable component 10 is further configured to move to bereceived in the housing 101, when there is no human face in the infraredimage, or when the human face in the infrared image does not match theface template of the authorized user, and/or when the depth image doesnot match the depth template of the authorized user, thereby avoidingthe continuous working of the infrared camera 12 and/or the structuredlight projector 13 after multiple verification failures, and avoidingaffecting the appearance of the electronic device 100 when the movablecomponent 10 remains exposed outside of the housing 101.

As illustrated in FIGS. 10 and 11, in some embodiments, a referenceposition is provided on the bracket 11, and moving the infrared camera12 and the structured light projector 13 toward the outside of thehousing 101 along with the bracket to extend from the housing 101 (theact at block 021) includes the following operations.

At block 0211, it is determined whether the reference position on themovable component 10 reaches the preset position.

At block 0212, when the reference position reaches the preset position,the bracket 11 stops moving.

The electronic device 100 further includes a detecting component 26, andthe reference position is provided on the bracket 11. The detectingcomponent 26 is configured to detect whether the reference position onthe movable component 10 reaches the preset position. When the referenceposition reaches the preset position, the bracket 11 stops moving.

The reference position may be a position at which the limiting portion(e.g., the limiting protrusion) on the bracket 11 and the positioningportion (e.g., the positioning groove) are located. The preset positionis a fixed position relative to the housing 101. In detail, the presetposition may be a position at which the limiting portion (e.g., thelimiting protrusion) on the housing 101 is located. When the movablecomponent 10 is received in the housing 101, the distance between thereference position and the preset position is the maximum stroke of themovable component 10. The detecting component 26 may be a detectingcircuit connected with a position switch (which may be a travel switch),the position switch is set at the preset position, and the bracket 11 isprovided with a protruding portion capable of triggering the positionswitch at the reference position. When the reference position on thebracket 11 moves to the preset position, the bracket 11 triggers theposition switch, which is detected by the detecting circuit, so that thedetecting component 26 can detect whether the reference position on thebracket 11 moves to the preset position.

As illustrated in FIG. 11, in some embodiments, the detection component26 includes a magnetic element 261, and a Hall sensor 262. The magneticelement 261 is disposed at the reference position. The Hall sensor 262is disposed at the preset position. In detail, when the magnetic element261 moves to the preset position, the magnetic element 261 is alignedwith the Hall sensor 262 and makes the signal on the Hall sensor 262changed. Whether the magnetic element 261 (or the bracket 11) reachesthe preset position can be determined according to the signal change ofthe Hall sensor 262.

As illustrated in FIG. 12, embodiments of the present disclosure furtherprovide a computer readable storage medium 60. The computer readablestorage medium 60 is applied to the verification device 200 in theabove-described embodiments. The computer readable storage medium 60 isconfigured to store one or more computer executable instructions. Whenthe one or more computer executable instructions are executed by one ormore processors 40, the processor 40 implements the following operationsof

01, determining whether the movable component 10 is triggered;

02, when the movable component 10 is triggered, controlling the bracket11 to move toward the outside of the housing 101 along with the infraredcamera 12 and the structured light projector 13 to enable the infraredcamera 12 and the structured light projector 13 to extend out from thehousing 101, and controlling the infrared camera 12 and the structuredlight projector 13 to be initialized;

03, controlling the infrared camera 12 to obtain an infrared image;

04, determining whether a human face exists in the infrared image;

053, when a human face exists in the infrared image, determining whetherthe human face matches the face template of the authorized user, andobtaining a laser pattern by the structured light projector 13 and theinfrared camera 12, obtaining a depth image according to the laserpattern, and determining whether the depth image matches the depthtemplate of the authorized user; and

06, when the human face matches the face template of the authorizeduser, and the depth image matches the depth template of the authorizeduser, determining that the verification is passed.

When the computer executable instructions are executed by the one ormore processors 40, the processor 40 further implements the followingoperations of:

05321, controlling the structured light projector 13 to project a laserlight;

05322, controlling the infrared camera 12 to obtain the laser patternafter modulation by an object; and

05331, processing the laser pattern to obtain the depth image.

When the computer executable instructions are executed by the one ormore processors, the processor 40 further implements the followingoperations of:

073, when the human face in the infrared image does not match the facetemplate of the authorized user, determining that the verification isfailed, and/or, when the depth image does not match the depth templateof the authorized user, determining that the verification is failed.

When the computer executable instructions are executed by the one ormore processors, the processor 40 further implements the followingoperations of:

084, when there is no human face in the infrared image, returning to theact of obtaining the infrared image by the infrared camera 12 (the actat block 03); or

085, when the human face in the infrared image does not match the facetemplate of the authorized user, returning to the act of obtaining theinfrared image by the infrared camera 12 (the act at block 03); and/or

086, when the depth image does not match the depth template of theauthorized user, returning to the act of obtaining the infrared image bythe infrared camera 12 (the act at block 03).

After the infrared camera 12 continuously collects the infrared imagefor the predetermined number of times, when the one or more computerexecutable instructions are executed by the one or more processors 40,the processors 40 further implements the following operations of:

093, when there is no human face in the infrared image, controlling themovable component 10 to move to be received into the housing 101; orwhen the human face in the infrared image does not match the facetemplate of the authorized user, controlling the movable component 10 tomove to be received in the housing 101; and/or, when the depth imagedoes not match the depth template of the authorized user, controllingthe movable component 10 to move to be received into the housing 101.

When the computer executable instructions are executed by the one ormore processors, the processor 40 further implements the followingoperations of:

0211, determining whether a reference position on the movable component10 reaches the preset position; and

0212, when the reference position reaches the preset position,controlling the bracket 11 to stop moving.

In the description of the present disclosure, reference throughout thisspecification to “an embodiment,” “some embodiments,” “an example,” “aspecific example,” or “some examples,” means that a particular feature,structure, material, or characteristic described in connection with theembodiment or example is included in at least one embodiment or exampleof the present disclosure. Thus, the appearances of the phrases invarious places throughout this specification are not necessarilyreferring to the same embodiment or example of the present disclosure.Furthermore, the particular features, structures, materials, orcharacteristics may be combined in any suitable manner in one or moreembodiments or examples.

The flow chart or any process or method described herein in othermanners may represent a module, segment, or portion of code thatcomprises one or more executable instructions to implement the specifiedlogic function(s) or that comprises one or more executable instructionsof the steps of the progress. Although the flow chart shows a specificorder of execution, it is understood that the order of execution maydiffer from that which is depicted. For example, the order of executionof two or more boxes may be scrambled relative to the order shown.

The logic or step described in other manners herein or shown in the flowchart, for example, a particular sequence table of executableinstructions for realizing the logical function, may be specificallyachieved in any computer readable medium to be used by the instructionexecution system, device or equipment (such as the system based oncomputers, the system comprising processors or other systems capable ofobtaining the instruction from the instruction execution system, deviceand equipment and executing the instruction), or to be used incombination with the instruction execution system, device and equipment.As to the specification, “the computer readable medium” may be anydevice adaptive for including, storing, communicating, propagating ortransferring programs to be used by or in combination with theinstruction execution system, device or equipment. More specificexamples of the computer readable medium comprise but are not limitedto: an electronic connection (an electronic device) with one or morewires, a portable computer enclosure (a magnetic device), a randomaccess memory (RAM), a read only memory (ROM), an erasable programmableread-only memory (EPROM or a flash memory), an optical fiber device anda portable compact disk read-only memory (CDROM). In addition, thecomputer readable medium may even be a paper or other appropriate mediumcapable of printing programs thereon, this is because, for example, thepaper or other appropriate medium may be optically scanned and thenedited, decrypted or processed with other appropriate methods whennecessary to obtain the programs in an electric manner, and then theprograms may be stored in the computer memories.

It should be understood that each part of the present disclosure may berealized by the hardware, software, firmware or their combination. Inthe above embodiments, a plurality of steps or methods may be realizedby the software or firmware stored in the memory and executed by theappropriate instruction execution system. For example, when it isrealized by the hardware, likewise in another embodiment, the steps ormethods may be realized by one or a combination of the followingtechniques known in the art: a discrete logic circuit having a logicgate circuit for realizing a logic function of a data signal, anapplication-specific integrated circuit having an appropriatecombination logic gate circuit, a programmable gate array (PGA), a fieldprogrammable gate array (FPGA), etc.

Those skilled in the art shall understand that all or parts of the stepsin the above exemplifying method of the present disclosure may beachieved by commanding the related hardware with programs. The programsmay be stored in a computer readable storage medium, and the programscomprise one or a combination of the steps in the method embodiments ofthe present disclosure when run on a computer.

In addition, each function cell of the embodiments of the presentdisclosure may be integrated in a processing module, or these cells maybe separate physical existence, or two or more cells are integrated in aprocessing module. The integrated module may be realized in a form ofhardware or in a form of software function modules. When the integratedmodule is realized in a form of software function module and is sold orused as a standalone product, the integrated module may be stored in acomputer readable storage medium.

The storage medium mentioned above may be read-only memories, magneticdisks, CD, etc. Although explanatory embodiments have been shown anddescribed, it would be appreciated by those skilled in the art that theabove embodiments cannot be construed to limit the present disclosure,and changes, alternatives, and modifications can be made in theembodiments without departing from spirit, principles and scope of thepresent disclosure.

What is claimed is:
 1. A verification method, comprising: determiningwhether a movable component is triggered, wherein the movable componentis received in a housing and capable of extending out from the housing,the movable component includes a bracket, an infrared camera disposed onthe bracket and a structured light projector disposed on the bracket;when the movable component is triggered, moving the infrared camera andthe structured light projector towards the outside of the housing alongwith the bracket to extend out from the housing, and initializing theinfrared camera and the structured light projector; obtaining aninfrared image by the infrared camera; determining whether a human faceexists in the infrared image; when a human face exists in the infraredimage, determining whether the human face matches a face template of anauthorized user, obtaining a laser pattern by the structured lightprojector and the infrared camera, obtaining a depth image according tothe laser pattern, and determining whether the depth image matches adepth template of the authorized user; and when the human face matchesthe face template of the authorized user, and the depth image matchesthe depth template of the authorized user, determining that verificationis passed.
 2. The verification method according to claim 1, wherein,when the human face exists in the infrared image, determining whetherthe human face matches the face template of the authorized user,obtaining the laser pattern by the structured light projector and theinfrared camera, obtaining the depth image according to the laserpattern, and determining whether the depth image matches the depthtemplate of the authorized user, comprises: when the human face existsin the infrared image, determining whether the human face matches theface template of the authorized user; and when the human face matchesthe face template of the authorized user, obtaining the laser pattern bythe structured light projector and the infrared camera, obtaining thedepth image according to the laser pattern, and determining whether thedepth image matches the depth template of the authorized user.
 3. Theverification method according to claim 1, wherein when the human faceexists in the infrared image, determining whether the human face matchesthe face template of the authorized user, obtaining the laser pattern bythe structured light projector and the infrared camera, obtaining thedepth image according to the laser pattern, and determining whether thedepth image matches the depth template of the authorized user,comprises: when the human face exists in the infrared image, determiningwhether the human face matches the face template of the authorized usersimultaneously with obtaining the laser pattern by the structured lightprojector and the infrared camera, obtaining the depth image accordingto the laser pattern, and determining whether the depth image matchesthe depth template of the authorized user.
 4. The verification methodaccording to claim 1, wherein one or more of the following: determiningwhether the human face exists in the infrared image is performed in atrusted execution environment; determining whether the human face in theinfrared image matches the face template of the authorized user isperformed in the trusted execution environment; and determining whetherthe depth image matches the depth template of the authorized user isperformed in the trusted execution environment.
 5. The verificationmethod according to claim 1, further comprising one of the following:when the human face in the infrared image does not match the facetemplate of the authorized user, determining that the verification isfailed; when the depth image does not match the depth template of theauthorized user, determining that the verification is failed; and whenthe human face in the infrared image does not match the face template ofthe authorized user, and the depth image does not match the depthtemplate of the authorized user, determining that the verification isfailed.
 6. The verification method according to claim 1, furthercomprising one of the following: when no human face exists in theinfrared image, returning to the act of obtaining the infrared image bythe infrared camera; when the human face does not match the facetemplate of the authorized user, returning to the act of obtaining theinfrared image by the infrared camera; when the depth image does notmatch the depth template of the authorized user, returning to the act ofobtaining the infrared image by the infrared camera; and when the humanface in the infrared image does not match the face template of theauthorized user, and the depth image does not match the depth templateof the authorized user, returning to the act of obtaining the infraredimage by the infrared camera.
 7. The verification method according toclaim 6, after the infrared camera continuously obtains the infraredimage for a predetermined number of times, further comprising one of thefollowing: when no human face exists in the infrared image, moving themovable component to be received into the housing; when the human facedoes not match the face template of the authorized user, moving themovable component to be received into the housing; when the depth imagedoes not match the depth template of the authorized user, moving themovable component to be received into the housing; and when the humanface in the infrared image does not match the face template of theauthorized user, and the depth image does not match the depth templateof the authorized user, moving the movable component to be received intothe housing.
 8. The verification method according to claim 1, wherein areference position is provided on the bracket, and moving the infraredcamera and the structured light projector towards the outside of thehousing along with the bracket to extend out from the housing comprises:determining whether the reference position on the movable componentreaches a preset position; and when the reference position reaches thepreset position, stopping the bracket from moving.
 9. An electronicdevice, comprising: a housing; a movable component, wherein the movablecomponent is received in the housing and capable of extending out fromthe housing, and the movable component comprises: a bracket; an infraredcamera disposed on the bracket; and a structured light projectordisposed on the bracket, wherein, when the movable component istriggered, the bracket is configured to move toward the outside of thehousing along with the infrared camera and the structured lightprojector to enable the infrared camera and the structured lightprojector to extend out from the housing, the infrared camera and thestructured light projector are configured to be initialized, wherein,the infrared camera is further configured to obtain an infrared image,and the infrared camera and the structured light projector are furtherconfigured to obtain a laser pattern; and a processor, configured to:determine whether the movable component is triggered; determine whethera human face exists in the infrared image; when the human face exists inthe infrared image, determine whether the human face matches a facetemplate of an authorized user, obtain a depth image according to thelaser pattern, and determine whether the depth image matches a depthtemplate of the authorized user; and when the human face matches theface template of the authorized user, and the depth image matches thedepth template of the authorized user, determine that verification ispassed.
 10. The electronic device according to claim 9, wherein theprocessor is configured to: when the human face exists in the infraredimage, determine whether the human face matches the face template of theauthorized user; and when the human face matches the face template ofthe authorized user, obtain the depth image according to the laserpattern, and determine whether the depth image matches the depthtemplate of the authorized user.
 11. The electronic device according toclaim 9, wherein the processor is configured to: when the human faceexists in the infrared image, determine whether the human face matchesthe face template of the authorized user; and when the human face existsin the infrared image, obtain the depth image according to the laserpattern, and determine whether the depth image matches the depthtemplate of the authorized user.
 12. The electronic device according toclaim 9, wherein the processor is further configured to generate atrusted execution environment, and one of the following: determinewhether a human face exists in the infrared image in the trustedexecution environment; determine whether the human face in the infraredimage matches the face template of the authorized user in the trustedexecution environment; and determine whether the depth image matches thedepth template of the authorized user in the trusted executionenvironment.
 13. The electronic device according to claim 9, wherein theprocessor is further configured to perform one of the following:determine that the verification is failed, when the human face does notmatch the face template of the authorized user; determine that theverification is failed, when the depth image does not match the depthtemplate of the authorized user; and determine that the verification isfailed, when the human face does not match the face template of theauthorized user, and the depth image does not match the depth templateof the authorized user.
 14. The electronic device according to claim 9,wherein the infrared camera is further configured to perform one of thefollowing: obtain a new infrared image, when no human face exists in theinfrared image; obtain a new infrared image, when the human face doesnot match the face template of the authorized user; obtain a newinfrared image, when the depth image does not match the depth templateof the authorized user; and obtain a new infrared image, when the humanface does not match the face template of the authorized user, and thedepth image does not match the depth template of the authorized user.15. The electronic device according to claim 14, wherein after theinfrared camera continuously obtains the infrared image for apredetermined number of times, the movable component is furtherconfigured to perform one of the following: move to be received in thehousing, when no human face exists in the infrared image does notcontain a human face; move to be received in the housing, when the humanface does not match the face template of the authorized user; move to bereceived in the housing, when the depth image does not match the depthtemplate of the authorized user; and to move to be received in thehousing, when the human face does not match the face template of theauthorized user, and the depth image does not match the depth templateof the authorized user.
 16. The electronic device according to claim 9,wherein the electronic device further comprises a detecting component; areference position is provided on the bracket; wherein the detectingcomponent is configured to detect whether the reference position on themovable component reaches a preset position; and wherein the bracket isconfigured to stop moving, when the reference position reaches thepreset position.
 17. The electronic device according to claim 16,wherein the detecting component comprises a magnetic element and a Hallsensor, the magnetic element is disposed at the reference position, andthe Hall sensor is disposed at the preset position.
 18. The electronicdevice according to claim 9, wherein the electronic device comprises anyone of a mobile phone, a tablet computer, a smart bracelet, and a smarthelmet.
 19. A verification device, comprising: a processor; and amemory, configured to store instructions executable by the processor,wherein the processor is configured to run a program corresponding tothe instructions by reading the instructions stored in the memory, so asto: determine whether a movable component is triggered, wherein themovable component is received in the housing and capable of extendingout from the housing, the movable component comprises a bracket, aninfrared camera disposed on the bracket and a structured light projectordisposed on the bracket; when the movable component is triggered,control the bracket to move toward the outside of the housing togetherwith the infrared camera and the structured light projector to enablethe infrared camera and the structured light projector to extend outfrom the housing, and control the infrared camera and the structuredlight projector to be initialized; control the infrared camera to obtainan infrared image; determine whether a human face exists in the infraredimage; when a human face exists in the infrared image, determine whetherthe human face matches a face template of an authorized user, controlthe infrared camera and the structured light projector to obtain a laserpattern, obtain a depth image according to the laser pattern, anddetermine whether the depth image matches a depth template of theauthorized user; and determine that verification is passed, when thehuman face matches the face template of the authorized user, and thedepth image matches the depth template of the authorized user.
 20. Theverification device according to claim 19, wherein the processor isconfigured to control the infrared camera and the structured lightprojector to obtain the laser patter simultaneously with determiningwhether the human face matches the face template of the authorized user,or after determining that the human face matches the face template ofthe authorized user.